<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>银行系统 - 管理首页</title>
<style>
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.header {
    background-color: #333;
    color: white;
    padding: 20px;
    text-align: center;
}

.navbar {
    background-color: #444;
    overflow: hidden;
}

.navbar a {
    float: left;
    display: block;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
}

.navbar a:hover {
    background-color: #555;
}

.content {
    padding: 20px;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background-color: #f9f9f9;
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-title {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}

.card-value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.recent-loans {
    margin-top: 30px;
}

.recent-loans h3 {
    margin-bottom: 15px;
}

.recent-loans table {
    width: 100%;
    border-collapse: collapse;
}

.recent-loans th, .recent-loans td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.recent-loans th {
    background-color: #f2f2f2;
}

.recent-loans tr:nth-child(even) {
    background-color: #f9f9f9;
}

.recent-loans tr:hover {
    background-color: #f5f5f5;
}

.status-pending { color: #FF9800; }
.status-approved { color: #4CAF50; }
.status-rejected { color: #F44336; }
.status-paid { color: #2196F3; }

@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
}
</style>
</head>
<body>
    <div class="header">
        <h1>银行管理系统 - 管理员界面</h1>
        <p>欢迎您，<c:out value="${sessionScope.user.username}" /></p>
    </div>
    
    <div class="navbar">
        <a href="totalUser">首页</a>
        <a href="loanApplications">贷款审批</a>
        <a href="adminLoanHistory.jsp">贷款历史</a>
        <a href="account">账户管理</a>
        <a href="logout">退出登录</a>
    </div>
    
    <div class="content">
        <div class="dashboard">
            <div class="card">
                <div class="card-title">今日申请数</div>
                <div class="card-value">${totalUser}</div>
            </div>
            
            <div class="card">
                <div class="card-title">待审批贷款</div>
                <div class="card-value">${tmoney}</div>
            </div>
            
            <div class="card">
                <div class="card-title">本月已批准金额</div>
                <div class="card-value">${money}</div>
            </div>
        </div>
        
        <div class="recent-loans">
            
        </div>
    </div>
</body>
</html>